package com.yilin.tms.core.entity.system.system;


import com.baomidou.mybatisplus.annotation.EnumValue;
import com.baomidou.mybatisplus.annotation.TableName;
import com.yilin.tms.core.commons.base.BaseEntity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * APP广告
 */
@Entity
@Table(name = "sys_app_banner")
@TableName("sys_app_banner")
public class AppBanner extends BaseEntity {

    //广告类型
    public enum ViewType {
        web(0, "网页"),
        video(1, "视频");
        @EnumValue
        public Integer index;
        public String name;

        ViewType(Integer index, String name) {
            this.index = index;
            this.name = name;
        }
    }

    //广告状态
    public enum ViewState {
        save(0, "已保存"),
        release(1, "已发布");
        @EnumValue
        public Integer index;
        public String name;

        ViewState(Integer index, String name) {
            this.index = index;
            this.name = name;
        }
    }

    //广告类型
    @Column(name = "view_type")
    private ViewType viewType;
    //广告状态
    @Column(name = "view_state")
    private ViewState viewState;
    //广告标题
    @Column(name = "title")
    private String title;
    //备注
    private String remark;
    //图片地址
    @Column(name = "image_url",columnDefinition = "TEXT")
    private String imageUrl;
    //文件地
    @Column(name = "file_url")
    private String fileUrl;


    public ViewType getViewType() {
        return viewType;
    }

    public void setViewType(ViewType viewType) {
        this.viewType = viewType;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public String getImageUrl() {
        return imageUrl;
    }

    public void setImageUrl(String imageUrl) {
        this.imageUrl = imageUrl;
    }

    public String getFileUrl() {
        return fileUrl;
    }

    public void setFileUrl(String fileUrl) {
        this.fileUrl = fileUrl;
    }

    public ViewState getViewState() {
        return viewState;
    }

    public void setViewState(ViewState viewState) {
        this.viewState = viewState;
    }
}
